from selenium import webdriver


def start_session():
    return webdriver.Chrome()

def close_session(driver):
    return driver.Close()

def get_data(page, size):
    # url = "https://www.zhipin.com/wapi/zpgeek/search/joblist.json?scene=1&query=&city=101270100&experience=&payType=&partTime=&degree=&industry=&scale=&stage=&position=100101&jobType=&salary=&multiBusinessDistrict=&multiSubway=&page={}&pageSize={}"
    url = "https://www.zhipin.com/web/geek/job?query=&city=101270100&position=100101"
    # url = url.format(page, size)
    # print(url)

    driver = start_session()
    driver.get(url)

    page_source = driver.page_source
    print(page_source)